
// var protobuf = require("protobufjs");
// // var s =  protobuf.encoder("2222");
// // console.log(protobuf.decoder(s))
//
//  protobuf.load('args.proto').then((root)=>{
//      const doc = { args1: 1, args2: 30, flag: 1 };
//      const User = root.lookupType('args.Args');
//      var errMsg = User.verify(doc);
//      if (errMsg)
//          throw Error(errMsg);
//      var message = User.create(doc);
//      var buffer = User.encode(message).finish();
//      var obj = User.decode(buffer);
//      console.log(obj)
// })


console.log(222+"      ")
console.log(222+"      ")


// protobuf.load("awesome.proto", function(err, root) {
//     if (err)
//         throw err;
//
//     // Obtain a message type
//     var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage");
//     const doc = { awesome_field: '2222'};
//         console.log(AwesomeMessage.encode(doc))
//     // Exemplary payload
//     var payload = { awesomeField: "AwesomeString" };
//
//     // Verify the payload if necessary (i.e. when possibly incomplete or invalid)
//     var errMsg = AwesomeMessage.verify(payload);
//     if (errMsg)
//         throw Error(errMsg);
//
//     // Create a new message
//     var message = AwesomeMessage.create(payload); // or use .fromObject if conversion is necessary
//     console.log(message)
//     // Encode a message to an Uint8Array (browser) or Buffer (node)
//     var buffer = AwesomeMessage.encode(message).finish();
//     // ... do something with buffer
//
//     // Decode an Uint8Array (browser) or Buffer (node) to a message
//     var message2 = AwesomeMessage.decode(buffer);
//     console.log(message2)
//     // ... do something with message
//     // If the application uses length-delimited buffers, there is also encodeDelimited and decodeDelimited.
//
//     // Maybe convert the message back to a plain object
//     var object2 = AwesomeMessage.toObject(message2, {
//         longs: String,
//         enums: String,
//         bytes: String,
//         // see ConversionOptions
//     });
//     console.log(object2)
// });